# #str_a=r"abc213\n!@!@!@!@"
# #var ="abcdefg"
#
# #var_list=[1,2,3,4,5,"a","b","c",True]
# #前闭后开原则，1<=x<5
#
# #print(var[0])
# #前闭后开原则，1<=x<5
# #start:stop：step
# #print(var[1:5:3])
# #数组
# #前闭后开原则，1<=x<5
# #start:stop：step
# #print(var_list[2::2])
#
# #hogwarts= "hogwars  teacher is %s"%"测试学院 "
# #print(hogwarts)
# #demo ="hogwarts is a {school}"
#
# #demo_res=demo.format(school="very good")
#
# #print(demo_res)
#
# #name="ad"
# #print(f"my name is {name}")
# # join的使用，列表，根据想要的格式拼接
# # a=["a","p","p","l","e"]
# #
# # print("|".join(a))
# #
# # #切分 split,将字符串根据规定的内容切分，以什么内容切分，以什么内容切分，什么内容没有
# # # b="a|p|p|l|e"
# # # b=b.split("|")
# # # print(b)
# # #替换 relace ,将目标内容替换想要的内容
# # # c="my name is ad"
# # # print(c.replace("m","思涵"))
# # #strip去掉首尾空格
# # a=" name a"
# # b = a.strip()
# # print(b)
#
# #判断条件
# # food = "banana"
# # color = "red"
# # if food == "apple":
# #     # 缩进
# #     print("苹果")
# #     if color == "red":
# #         print("红苹果")
# # elif food == "banana" and color == "red":
# #     print("红香蕉")
# # elif food == "orange":
# #     print("橘子")
# # else:
# #     print("food是其他食物")
# # 三木运算符
# a=1
# b=2
# # if a>b:
# #     school= "howarts"
# # else:
# #     school=  "测试许愿"
# # print(school)
# # 赋值语句放在最前面 if 判断条件 else else需要赋值内容
# # school = "howarts" if a>b else "howarts2"
# # print(school)
# # 循环
# # for in循环
# # a = [1,2,3,4,5,7]
# # for i in a:
# #     print(i)
# # range 只传入一个参数，传入的是结束的值遵循前闭后开原则
# # 当range传入两个参数的时候，(开始数值，结束数值)2<=i<12
# # 当range传入三个参数的时候，(开始数值，结束数值，部长)2<=i<12
# # for i in range(2,12,2):
# #     print(i)
# # while循环
# # a = 0
# # while a<6:
# #     print("循环")
# #     # 1.不要直接使用  2注意设定的跳出条件
# #     a+=1
# #     if a==3:
# #         break
# # list_a = [1,2,3,5,5,6]
# # for i in list_a:
# #     print(i)
# #     if i==3:
# #         break
# # b=1
# # s=0
# # while b<101:
# #     b=b+1
# #     s=s+b
# #     if b==101:
# #      print(s)
# s=0
# # for i in range(1, 10001):
# #     s=s+i
# #     if i==10000:
# #      print(s)
# # list_a = [1,2,3,5,5,6]
# # for i in list_a:
# #      print(i)
# #      if i==3:
# #          continue
# #          print(i)
# # s=0
# # for i in range(1,101):
# #     if i%2==0:
# #         s=s+i
# #         if i==100:
# #             print(s)
# # for i in range(0,101,2):
# #     s=s+i
# #     print(s)
# # import random
# #
# # computer_num =random.randint(1,100)
# # print("computer_num",computer_num)
# # people_num = int(input("请输入数字："))
# # while True:
# #  if computer_num>people_num:
# #     print("大一点")
# #     break
# #  elif computer_num<people_num:
# #     print("小一点")
# #     break
# #  else:
# # #     print("猜对了")
# # #     break
# # li =list()
# # print(type(li),li)
# # li1= list('hogwarts')
# # print(type(li1),li1)
# # li2 =[1,2,3]
# # li3 =['hogwarts','hello']
# # li4 =[1,3.14,'hogwarts',[5,6,7]]
# # print(li4)
# #
# # li5 =[i for i in range(1,10) if i%2 ==0]
# # print(li5)
# #
# # li6 = [1,2,3,4,5,6]
# # print(li6[3])
# # print(li6[-5])
# #列表切片[start,stop,step]
# #
# # li = ['h','o','g','w','a','r','t','s']
# # print(li[0:5:2])
# # print(li[2:4])
# # print(li[:4])
# # print(li[2:])
# # print(li[::2])
# # print(li[::-2])
# # li11 =[]
# # li11.append(1)
# # li11.append('hogwarts')
# # print(len(li11),li11)
# # li11.extend('hello',)
# # print(len(li11),li11)
# # li12=['a','b','c']
# # li11.extend(li12)
# # print(len(li11),li11)
# # li13 =[1,2,3.4,5]
# # li13.insert(0,'test')
# # print(li13)
# # li13.insert(3,'hello')
# # print(li13)
# # li14 =[1,2,3,4,5,6]
# # li14.pop(1)
# # print(li14)
# # li14.pop(4)
# # print(li14)
# # tup1 =1,2,3,4,5
# # print(type(tup1),tup1)
# # tup2 =(1,2,3,4,5)
# # print(type(tup2),tup2)
# # #注意：单元素元组，逗号不可或缺
# # tub6 =1,
# # print(type(tub6),tub6)
# #逗号省略得到int类型，不是元组类型
# tup10 =tuple('hogowarts')
# # print(tup10)
# # print(tup10[0:3:1])
# # print(tup10[::-1])
# print(tup10.index('o'))
# print(tup10.count('o'))
# class Solution:
#     def findMaxConsecutiveOnes(self, nums: list[int]) -> int:
#         max_count=0
#         count=0
#         for i in range(0, len(nums)):
#             if nums[i] != 0 and nums[i] != 1:
#                 return "不是二进制数组"
#                 break
#         for i in range(0, len(nums)):
#             if nums[i] == 1:
#                 count += 1
#                 max_count = max(max_count, count)
#             else:
#                 count = 0
#             continue
#         return max_count
#
# solution = Solution()
# # li = [1, 1, 0, 1, 1, 1]
# # print(len(li))
# print(solution.findMaxConsecutiveOnes([1, 1, 1, 1, 0, 1, 1, 0, 1,1,0,1,0]))
# li = [1,1,1,1,1,1]
# print(len(li))
# class Solution:
#     def findMaxConsecutiveOnes(self, num: list[int]) -> int:
#         max_count = 0
#         count = 0
#         for j in range(0, len(num)):
#             if num[j] != 0 and num[j] != 1:
#                 return '不是二进制数组'
#         for j in range(0, len(num)):
#
#             if num[j] == 1:
#                 count += 1
#                 if count > max_count:
#                     max_count = count
#
#             else:
#                 count = 0
#             continue
#         return max_count
#
#
# solution = Solution()
# print(solution.findMaxConsecutiveOnes([1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0]))
class Solution:
    def findMaxConsecutiveOnes(self, num: list[float]) -> float:
        for i in range(0, len(num)):
            print(num)
            for j in range(0, len(num)):
                if num[j] >= num[i]:
                    a = num[j]
                    num[j] = num[i]
                    num[i] = a
        return num


solution = Solution()
print(solution.findMaxConsecutiveOnes([2, 4, 6, 7, 9, 35, 24, 4.5, 6.9, 1, 0, 1, 0]))
print(range(0, len([4, 6, 7, 9, 35, 24, 4.5, 6.9, 1, 0, 1, 0])))
name = "yanfeng"
print('my name is {}'.format(name))
